package cn.tedu.innerclass;

/**
 * @author :Colin
 * @version 创建时间: 2021/6/25 15:17
 */
public class TestInner2 {
    public static void main(String[] args) {
//        Outer2.Inner2 oi = new Outer2().new Inner2();
//        oi.eat();
        Outer2 ou =new Outer2();
        ou.getInner2Eat();
    }

}
class Outer2{
    public void getInner2Eat(){
        Inner2 in=new Inner2();
        in.eat();
    }
    private class Inner2{
        public void eat(){
            System.out.println("Inner...eat()");
        }
    }
}